<script>
// 基础信息
import { defineComponent } from 'vue'
export default defineComponent({
	name: 'EditQrBase'
})
</script>
<script setup>
import { reqQrGroupList, reqQrGroupUpdate, reqQrList } from '@/api'
import { qrGroupListData } from '@/data'
import { weekList, isEmpty } from '@/utils'
import { toRaw } from "vue"
import { ref, defineExpose, reactive } from 'vue'
import MyIcon from '@/components/my-icon/index.vue'
import { CircleClose, Search, CirclePlus } from '@element-plus/icons-vue'
import ChooseDialogue from '@/components/app/chooseDialogue.vue'
import labels from '@/components/app/label.vue'
const isShow = ref(false)
const isRefresh = ref(true)
const props = defineProps({
	editForm: {
		type: Object,
		default: {}
	},
	groupListData: {
		type: Array,
		default: []
	}
})



const form = ref()
const groupList = ref()
const visible = ref(false)
let selectStaffupDataIds = []


const selectstaff_standbyData = ref([])
const selectTagData = ref([])
const staffupData = ref(toRaw(props.editForm).staffup_data||[])

form._value = toRaw(props.editForm)
console.log(props.editForm.staff_type)
form.value.staff_type=props.editForm.staff_type
console.log(form.value.staff_type)
groupList._value = props.groupListData


isShow.value = true

const TestRef =ref()
const isTag = ref(form.value.tag_info)
if(isTag.value){
	for(var i = 0;i<isTag.value.length;i++){
	form.value.tag.push(isTag.value[i].tag_id)
}
}

const isTagids=ref(form.value.tag)
console.log(form.value)
const labeldataapi=(val)=>{
  console.log(val,'8y9789789789')
  form.value.tag_info=val.list
  form.value.tag=val.id
  isTag.value=val.list
//   form.value.tag=isTagids.value
  // labeldata.value=val.list
  // for(var i = 0;i<labeldata.value.length;i++){
  //   if(i == 0){
  //     labelinput.value=labeldata.value[i].name
  //   }else{
  //     labelinput.value=labelinput.value + ',' +labeldata.value[i].name
  //     console.log(labelinput.value)
  //   }
  // }
}
const getDialogueData1 = (val)=>{
  console.log(val,'asdasdasd')
  
}

// console.log()
const staffTimeArr = ref({})
console.log(toRaw(props.editForm).staff_data)
// TODO 格式不对
console.log(toRaw(props.editForm).staff_type,'pppppppppppppp')
const staff_data = ref([])
if (toRaw(props.editForm).staff_type==2){
	var arr = toRaw(props.editForm).staff_data
	var newArr = []
	var timeArr = {}
	var staffDataTemp = []
	arr.forEach((item,index)=>{
		console.log(item.staffname,item.staffid,item.week,toRaw(props.editForm),'opopopop')
		newArr.push({
			selectStaffData:item.staffname,
			selectstaffids:item.staffid,
			week:typeof(item.week)=='string'?item.week.split(','):[]
		})
		timeArr[index+'']=ref([item.startime,item.endtime])
		item.staffname.forEach(item2=>{
			staffDataTemp = staffDataTemp.filter(item1=>item2.id!=item1.id)
			staffDataTemp.push(item2)
		})
	})
	if (staffupData.value.length==0){
		console.log(staffupData.value)
		staffupData.value = staffDataTemp;
	}
	console.log(staffupData.value,'jjjjjjjjjjjjjj')
	
	staff_data._value = newArr
	staffTimeArr._value = timeArr
}else{
	staff_data._value = toRaw(props.editForm).staffName || []
}
const idsdated=ref([])
if(toRaw(props.editForm).staff_standby_name!=null){
	selectstaff_standbyData.value = toRaw(props.editForm).staff_standby_name
	idsdated.value = []
	toRaw(props.editForm).staff_standby_name.forEach(item=>{
		idsdated.value.push(item.id)
	})
}

props.editForm.staffid = toRaw(props.editForm).staffName
||[]
// const staff_data = ref(toRaw(props.editForm).staff_data)



const selectStaffData = ref(toRaw(props.editForm).staffName
||[])



const changeTime = (val,index) => {
	console.log(staffTimeArr.value,'kll;k;k;llk;')
	console.log(staffTimeArr.value[index])
	console.log(val,index,'i9-0-90-')
}
const submit = () => {
	if (!formRef.value) return
	formRef.value.validate((valid) => {
		if (valid) {
			console.log(form.value)
			var json = form.value
			json.week = week.value.join(',')
			json.time = time.value.join('~')
			console.log(json, '保存二维码编辑接口')
			return form.value
		} else {
			console.log('error submit!')
			return false
		}
	})
}
const chooseDialogue = ref()
const hoverGroupIndex = ref(0)
const sx = ref(0)

const isNew = ref(true)
const dialogVisible = ref(false)
const openingDialogName = ref('')

const staff_dataIndex = ref(0)





// 员工添加上线

// taffTimeArr   push的是ref获取值的时候要循环toRaw




const searchVal = ref('')

//form
const formRef = ref()
const rules = ref({
	// name: [
	// 	{
	// 		required: true,
	// 		message: '请输入名称',
	// 		trigger: 'blur'
	// 	}
	// ]
})
// 强制刷新
const handleRefresh = () => {
	isRefresh.value = false
	isRefresh.value = true
}
const checkIsChooseStaff=()=>{
	console.log(staffupData)
	try{
		if (staffupData.value.length>0) {
			handleRefresh()
		}else{
			form.value.staff_status = 0
			ElMessage({
				message: '未添加使用成员，请先选择使用成员',
				type: 'error',
			})
		}
	}catch{
		form.value.staff_status = 0
		ElMessage({
				message: '未添加使用成员，请先选择使用成员',
				type: 'error',
			})
	}
	
}
const change = (e) => {}

const getDataByIds = (val) => {
	switch (val) {
		case 'staffid':
			console.log(val)
			selectStaffData._value = toRaw(form.value[val])
			staffupData._value = selectStaffData._value
			console.log('根据ids获取已选员工列表', form.value[val], selectStaffData._value)
			break
		case 'staffidTime':
			console.log(form.value[val], '879789789')
			var arr = toRaw(staff_data.value)
			arr[staff_dataIndex.value].selectStaffData = form.value[val]
			staff_data._value = arr


			var staffDataTemp = []
			arr.forEach(item=>{
				item.selectStaffData.forEach(item=>{
					staffDataTemp = staffDataTemp.filter(item1=>item1.id!=item.id)
					staffDataTemp.push(item)
				})
			})




			staffupData._value = staffDataTemp

			console.log('staffidTimestaffidTime根据ids获取已选员工列表', staff_data.value)
			break
		case 'staff_standby':
			
			selectstaff_standbyData._value = toRaw(form.value[val])
			break
		case 'tag':
			selectTagData._value = [
				{
					id: 1,
					name: '21'
				}
			]
			break
	}
	handleRefresh()
}

// 批量处理
const batch = (val) => {
	switch (val) {
		case 'staff':
			visible.value = false
			var arr = staffupData.value
			arr.forEach((item) => {
				// if (selectStaffupDataIds.includes(item.staffid)) {
				// 	item.sx = sx.value
				// }
				item.sx = sx.value
			})
			staffupData._value = arr
			console.log(staffupData._value,'llkkkkkkkkkkkkk')
			handleRefresh()
			break
	}
}

const handleSelectionChange = (val) => {
	selectStaffupDataIds = []
	val.forEach((item) => {
		selectStaffupDataIds.push(item.staffid)
	})
}

// 弹窗
const showDialogue = (name, title, index) => {
	switch (name) {
		case 'staff':
			if (title == 'staffid') {
				openingDialogName.value = 'staffid'
				var arr = toRaw(form.value.staffid)
				var dataArr = []
				arr.forEach((item) => {
					dataArr.push(item)
				})
				chooseDialogue.value.show(name, dataArr)
			} else if (title == 'staffidTime') {
				openingDialogName.value = 'staffidTime'
				staff_dataIndex.value = index
				var arr = toRaw(staff_data.value)[index].selectstaffids
				console.log(arr, 'sdfdsf')
				var dataArr = []
				arr.forEach((item) => {
					dataArr.push(item)
				})
				chooseDialogue.value.show(name, dataArr)
			} else {
				openingDialogName.value = 'staff_standby'
				var arr = toRaw(form.value.staff_standby)
				var dataArr = []
				arr.forEach((item) => {
					dataArr.push(item)
				})
				chooseDialogue.value.show(name, dataArr)
			}
			break

		case 'tag':
			openingDialogName.value = name
			var arr = toRaw(form.value[name])
			var dataArr = []
			arr.forEach((item) => {
				dataArr.push(item)
			})
			// chooseDialogue.value.show(name, dataArr)
		var data = {
    show:true,
    type:2
  }
  TestRef.value.tableshow(data)
			break
	}
}

const getDialogueData = (val) => {
	// console.log(openingDialogName.value)
	// if(openingDialogName.value == 'staff_standby'){
	// 	form.value.staff_standby=val
	// 	console.log(form)
	// }else{
		var json = toRaw(form.value)
		json[openingDialogName.value] = val
		form._value = json
		getDataByIds(openingDialogName.value)
		if(openingDialogName.value == 'staff_standby'){
			idsapi(val)
		}
	// }
	
}

const handleDele = (name, item, index) => {
	switch (name) {
		case 'staffidTime':
			var arr = toRaw(staff_data.value)
			arr.splice(index, 1)
			staff_data._value = arr
			break
		case 'staffid':
			var arr = selectStaffData.value
			arr.splice(index, 1)
			selectStaffData._value = arr
			var json = toRaw(form.value)
			json[name].splice(index, 1)
			form._value = json
			break
		case 'staff_standby':
			var arr = selectstaff_standbyData.value
			arr.splice(index, 1)
			selectstaff_standbyData._value = arr
			idsapi(selectstaff_standbyData._value)
			var json = toRaw(form.value)
			json[name].splice(index, 1)
			form._value = json
			console.log(form)
			break
		case 'tag':
			var arr = selectTagData.value
			arr.splice(index, 1)
			selectTagData._value = arr
			var json = toRaw(form.value)
			json[name].splice(index, 1)
			form._value = json
			break
	}
	handleRefresh()
}

const handleDeleListItem = (name, title, item, index, idx) => {
	var arr = toRaw(staff_data.value)
	arr[index].selectStaffData.splice(idx, 1)
	arr[index].selectstaffids.splice(idx, 1)
	staff_data._value = arr
	handleRefresh()
}

const searchStaff = () => {
	console.log('搜索')
}

const addListItem = (name) => {
	switch (name) {
		case 'staff_data':
			var arr = toRaw(staff_data.value)
			arr.push({
				selectStaffData: [],
				selectstaffids: [],
				week: []
			})
			var obj = staffTimeArr.value
			obj[arr.length - 1+'']=ref([])
			staffTimeArr.value = obj
			// TODO staffTimeArr即为这里的time
			staff_data.value = arr
			console.log(staff_data.value,'asdasdasd')
			break
	}
	handleRefresh()
}
console.log(staff_data.value,staffTimeArr.value)


const idsapi=(val)=>{
	console.log(val)
	
	for(var i =0;i<val.length;i++){
		idsdated.value.push(val[i].id)
	}
}
console.log(idsdated.value,'dfgdfgfdgfdg')
const handleClose=(val,index)=>{
	isTag.value.splice(index,1)
  	isTagids.value.splice(index,1)
	form.value.tag=isTagids.value
}
const getExposeData=() =>{
	console.log(selectstaff_standbyData)
	idsdated.value=[]
	for(var i =0;i<selectstaff_standbyData.value.length;i++){
		idsdated.value.push(selectstaff_standbyData.value[i].id)
	}
	return {
		staffTimeArr:	staffTimeArr.value,
		staff_data:	staff_data.value,
		staffupData:staffupData.value,
		standbyData:idsdated.value,
	}
}
const emits = defineEmits(['goBack'])
defineExpose({
	submit,
	getExposeData,
})
</script>

<template>
	<div v-if="isShow">
		<div class="app-edit app-gap-block-top">
			<div class="app-edit-title">
				<span class="app-edit-title-words">基础信息</span>
			</div>
			<div class="app-edit-body">
				<el-form ref="formRef" :model="form" :rules="rules" label-width="140px">
					<el-form-item label="二维码名称:" prop="name">
						<el-input v-if="isRefresh" @input="handleRefresh" class="app-max-width" size="large" v-model="form.name" />
					</el-form-item>
					<el-form-item label="选择分组:">
						<div>
							<el-select
								v-if="isRefresh"
								v-model="form.groupid"
								class="m-2"
								@change="handleRefresh"
								placeholder="请选择"
								size="large"
							>
								<el-option v-for="(item, index) in groupList" :key="index" :label="item.name" :value="item.id" />
							</el-select>
						</div>
					</el-form-item>
					<el-form-item label="客服人员:" prop="">
						<div v-if="isRefresh">
							<el-radio-group @change="form.staff_status = 0;staff_data=[];staffupData=[];selectStaffData=[];handleRefresh()" v-model="form.staff_type" class="app-radio">
								<el-radio :label="1" size="large">全天在线</el-radio>
								<el-radio :label="2" size="large">自动上下线</el-radio>
							</el-radio-group>
							<div v-if="form.staff_type == 1">
								<div>
									<div class="app-words-btn" @click="showDialogue('staff', 'staffid')">
										<div class="app-flex-left">
											<MyIcon class="app-down-icon" name="Add" />
											<span class="app-gap-words-left-xs">添加成员</span>
										</div>
									</div>
								</div>
								<div class="app-words-tip-weak">
									同一个二维码可选择多位客服成员进行接待，客户扫码后随机分配一名客服人员
								</div>
								<div class="" v-if="isRefresh">
									<span class="app-tag app-gap-tr" v-for="(select, index) in selectStaffData" :key="index">
										<span class="app-flex-left">
											<el-avatar class="cho-margin" shape="square" :size="30" :src="select.avatar" />
											<span class="app-gap-words-left">{{ select.name }}</span>
										</span>
										<el-icon
											@click="handleDele('staffid', select, index)"
											class="app-tag-close"
											:size="16"
											color="#999"
										>
											<CircleClose />
										</el-icon>
									</span>
								</div>
							</div>
							<div v-else>
								<!-- <el-tag class="app-el-tag">
									自动上下线：1、可用于员工早晚班等不同上班时间段使用；
									<div style="margin-left: 72px; margin-top: 10px">2、员工在非线上时间将不再接待新客户。</div>
								</el-tag> -->
								<div style="padding: 7px 60px;color:#409eff;background-color: #ecf5ff;border-radius: 3px;">
									自动上下线：1、可用于员工早晚班等不同上班时间段使用；
									<div style="margin-left: 72px; margin-top: 5px">2、员工在非线上时间将不再接待新客户。</div>
								</div>
								<div v-if="isRefresh">
									<div v-for="(item, index) in staff_data" :key="index" class="app-module app-gap-margin-top">
										<div class="">
											<div class="app-words-btn" @click="showDialogue('staff', 'staffidTime', index)">
												<div class="app-flex-left">
													<span class="app-gap-words-left-xs">添加成员</span>
												</div>
											</div>
										</div>
										<div class="">
											<span class="app-tag app-gap-tr" v-for="(select, idx) in item.selectStaffData" :key="idx">
												<span class="app-flex-left" v-if="isRefresh">
													<el-avatar class="cho-margin" shape="square" :size="30" :src="select.avatar" />
													<span class="app-gap-words-left">
														{{ select.name }}
													</span>
												</span>
												<el-icon
													@click="handleDeleListItem('staff_data', 'selectStaff', select, index, idx)"
													class="app-tag-close"
													:size="16"
													color="#999"
												>
													<CircleClose />
												</el-icon>
											</span>
										</div>
										<div class="app-gap-margin-top">
											<span class="app-4-words">工作周期:</span>
											<el-select
												@change="handleRefresh"
												v-model="item.week"
												class="m-2"
												placeholder="请选择"
												size="large"
												multiple
											>
												<el-option v-for="(item, index) in weekList" :key="index" :label="item.name" :value="item.id" />
											</el-select>
										</div>
										<div class="app-gap-margin-top">
											<span class="app-4-words">上线时间:</span>
											<el-time-picker
												v-if="isRefresh"
												@change="(val)=>changeTime(val,index)"
												size="large"
												v-model="staffTimeArr[index+''].value"
												is-range
												value-format="HH:mm"
												format="HH:mm"
												range-separator="～"
												start-placeholder="开始时间"
												end-placeholder="结束时间"
											/>
										</div>

										<el-icon
											v-if="index != 0"
											@click="handleDele('staffidTime', select, index)"
											class="app-tag-close"
											:size="16"
											color="#999"
										>
											<CircleClose />
										</el-icon>
									</div>
								</div>

								<span @click="addListItem('staff_data')" class="app-tip-words app-add-btn">
									<el-icon class="" :size="16" color="#333">
										<CirclePlus />
									</el-icon>
									<span class="app-gap-words-left-s">添加其他工作周期</span>
								</span>
							</div>
						</div>
					</el-form-item>
					<el-form-item label="员工添加上限:">
						<div v-if="isRefresh">
							<div>
								<el-switch
									:active-value="1"
									:inactive-value="0"
									@click="checkIsChooseStaff"
									size="small"
									v-model="form.staffup_status"
								/>
								<span class="app-switch-right-text">已{{form.staffup_status==1?'开启':'关闭'}}</span>
							</div>

							<div class="app-gap-margin-top" v-if="form.staffup_status == 1">
								<el-tag class="app-el-tag">
									员工添加上限： 员工从该渠道添加的客户达到每日上限后将自动下线，当日不再接待该渠道新客户
								</el-tag>
								<div>
									<div class="app-gap-margin-top app-flex-2">
										<el-input
											v-model="searchVal"
											class="inp-w-200"
											size="large"
											@input="searchStaff"
											placeholder="请输入名称"
											clearable
											:suffix-icon="searchVal.length == 0 ? Search : ''"
										/>
										<el-popover v-model:visible="visible" placement="top" :width="320">
											<p class="app-flex-left">
												员工每日添加上限：
												<el-input-number @input="handleRefresh" class="app-gap-words-left-s" v-model="sx" :min="0" />
											</p>
											<div class="app-pop-btn">
												<div>
													<el-button text @click="visible = false"> 取消 </el-button>
													<el-button type="primary" @click="batch('staff')"> 确定 </el-button>
												</div>
											</div>
											<template #reference>
												<span @click="visible = true" class="app-tip-words"> 批量设置 </span>
											</template>
										</el-popover>
									</div>

									<div class="app-container-radius">
										<el-table
											class="app-container-radius"
											ref="multipleTableRef"
											:data="staffupData"
											style="width: 100%"
											@selection-change="handleSelectionChange"
										>
											<el-table-column type="selection" fixed="left"></el-table-column>
											<el-table-column>
												<template #header>
													<div class="app-flex-left">
														<span class=""> 共{{ staffupData.length }}个员工 </span>
													</div>
												</template>
												<template #default="scope">
													<div class="app-flex-left">
														<el-avatar class="cho-margin" shape="square" :size="30" :src="scope.row.avatar" />
														<span class="app-gap-words-left">
															{{ scope.row.name }}
														</span>
													</div>
												</template>
											</el-table-column>
											<el-table-column align="right">
												<template #header>
													<span class="">每日添加客户上限</span>
												</template>
												<template #default="scope">
													<div v-if="isRefresh">
														<el-input-number v-model="scope.row.sx" :min="0" @input="handleRefresh" />
													</div>
												</template>
											</el-table-column>
										</el-table>
									</div>
								</div>
							</div>
						</div>
					</el-form-item>
					<el-form-item class="app-input" label="允许员工上下线:">
						<div v-if="isRefresh">
							<el-switch
								:active-value="1"
								:inactive-value="0"
								@change="handleRefresh"
								size="small"
								v-model="form.staffline_status"
							/>
							<span class="app-switch-right-text">已{{form.staffline_status==1?'开启':'关闭'}}</span>
							<div class="app-words-tip-weak">开启后员工可在侧边栏修改个人上下线状态</div>
						</div>
					</el-form-item>
					<el-form-item label="备用员工:">
						<div>
							<div class="app-flex-left">
								<div class="app-words-btn" @click="showDialogue('staff', 'staff_standby')">
									<div class="app-flex-left">
										<MyIcon class="app-down-icon" name="Add" />
										<span class="app-gap-words-left-xs"> 选填，请选择备用员工 </span>
									</div>
								</div>
								<div class="app-words-tip-weak app-gap-words-left">
									当活码中所有员工均不可接待时，将分配客户给该员工
								</div>
							</div>
							<div class="" v-if="isRefresh">
								<span class="app-tag app-gap-tr" v-for="(select, index) in selectstaff_standbyData" :key="index">
									<span class="app-flex-left">
										<el-avatar class="cho-margin" shape="square" :size="30" :src="select.avatar" />
										<span class="app-gap-words-left">{{ select.name }}</span>
									</span>
									<el-icon
										@click="handleDele('staff_standby', select, index)"
										class="app-tag-close"
										:size="16"
										color="#999"
									>
										<CircleClose />
									</el-icon>
								</span>
							</div>
						</div>
					</el-form-item>
					<el-form-item class="app-input" label="客户标签:">
						<div v-if="isRefresh">
							<el-switch
								:active-value="1"
								:inactive-value="0"
								@change="handleRefresh"
								size="small"
								v-model="form.tag_status"
							/>
							<span class="app-switch-right-text">已{{form.tag_status==1?'开启':'关闭'}}</span>
							<div v-if="form.tag_status == 1">
								<el-tag class="app-el-tag app-gap-margin-top" type="warning">
									<MyIcon class="app-icon app-warning-font" name="Bell" />
									因企业微信限制，标签存在延时，预计会在添加客户后的2分钟之内打上
								</el-tag>
								<div class="app-gap-margin-top">
									<div class="app-flex-left">
										<div class="app-words-btn" @click="showDialogue('tag')">
											<div class="app-flex-left">
												<MyIcon class="app-down-icon" name="Add" />
												<span class="app-gap-words-left-xs">添加标签</span>
											</div>
										</div>
										
									</div>
									<div>
											<el-tag
												v-for="(tag,index) in isTag"
												:key="index"
												class="mx-1"
												closable
												:disable-transitions="false"
												@close="handleClose(tag,index)"
												style="margin: 3px;"
											>
											{{ tag.tag_name }}
										</el-tag>
										</div>
									<div class="" v-if="isRefresh">
										<span class="app-tag app-gap-tr" v-for="(select, index) in selectTagData" :key="index">
											<span class="app-flex-left">
												<span class="app-gap-words-left">
													{{ select.name }}
												</span>
											</span>
											<el-icon @click="handleDele('tag', select, index)" class="app-tag-close" :size="16" color="#999">
												<CircleClose />
											</el-icon>
										</span>
									</div>
								</div>
							</div>
						</div>
					</el-form-item>
					<el-form-item label="客户备注:">
						<div v-if="isRefresh">
							<el-switch
								:active-value="1"
								:inactive-value="0"
								@change="handleRefresh"
								size="small"
								v-model="form.customerbz_status"
							/>
							<span class="app-switch-right-text"> 已{{ form.customerbz_status == 1 ? '开启' : '关闭' }} </span>
							<div class="app-words-tip-weak">开启后可为客户昵称加备注，方便查看客户来源</div>
							<div class="app-module" v-if="form.customerbz_status == 1">
								<div class="app-flex-left">
									<span class="app-4-words">备注位置:</span>
									<el-radio-group @change="handleRefresh" v-model="form.customerbzqh_status" class="app-radio">
										<el-radio :label="2" size="large">备注在昵称后</el-radio>
										<el-radio :label="1" size="large">备注在昵称前</el-radio>
									</el-radio-group>
								</div>
								<div>
									<el-input @input="handleRefresh" size="large" v-model="form.customerbz" placeholder="请输入">
										<template #prepend>客户昵称-</template>
									</el-input>
								</div>
								<div class="app-flex-left app-gap-margin-top">
									<span>预览:</span>
									<div class="app-words-box app-gap-words-left">
										<div class="app-flex-left">
											<MyIcon class="app-down-icon primary-font" name="Person" />
											<span class="app-gap-words-left-xs">
												<span v-if="form.customerbzqh_status == 2"> 客户昵称- </span>
												{{ form.customerbz }}
												<span v-if="form.customerbzqh_status == 1"> -客户昵称 </span>
											</span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</el-form-item>
					<el-form-item class="app-input" label="客户描述:">
						<div v-if="isRefresh">
							<div class="app-flex-left">
								<el-switch
									:active-value="1"
									:inactive-value="0"
									@change="handleRefresh"
									size="small"
									v-model="form.customerdes_status"
								/>
								<span class="app-switch-right-text"> 已{{ form.customerdes_status == 1 ? '开启' : '关闭' }} </span>
							</div>
							<div class="app-words-tip-weak">开启后可为客户添加描述，将在客户画像里展示</div>
							<div v-if="form.customerdes_status == 1">
								<el-input
									class="app-max-width"
									v-model="form.customerdes"
									@input="handleRefresh"
									maxlength="150"
									placeholder="请输入"
									show-word-limit
									type="textarea"
								/>
							</div>
						</div>
					</el-form-item>
				</el-form>
			</div>
		</div>
		<ChooseDialogue @getChooseData="getDialogueData($event, val)" ref="chooseDialogue" />
		<labels ref="TestRef" :labeldataapi="labeldataapi" @getDialogueData="getDialogueData1($event, val)"></labels>
	</div>
</template>
<style lang="scss">
@import url('../../../../../style/app-component.scss');
@import '../../../../../style/mixin.scss';
</style>
